<!DOCTYPE type>
<html ng-app="myapp">
	<head>
		<meta charset="utf-8"/>
		<title>anjular测试</title>
		<script src="../js/angular.min.js"></script>			
		<link rel="stylesheet" type="text/css" href="../css/index.css"/>	
	</head>
	<body >		
		<div class="frame" ng-controller="c7_3">
			<div class="show">
				<input type="text" ng-model="num" />
				<button ng-click="onclick()">验证奇偶</button>
				<div class="tip">
					您输入的是：{{result}}
 				</div>				
			</div>
			
		</div>
		
	</body>	
	<script>
		angular.module('myapp'[])
			.controller('c7_3',function($scope,$http){
				$scope.num=0;
				$scope.resule= "偶数";
				$scope.onclick=function(){
					$http({
						method:'GET',
						url:'data/chk.php',
						params:{
							n:$scope.num
						}
					})
					.success(function(data,status,headers,config){
						$scope.result=data;
					})
					
					
				}
				
			})
		
		
	
	</script>	
</html>